//package com.example.webdemo.interceptor;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.redis.core.StringRedisTemplate;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.HandlerInterceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;

/**
 * @Date 2021/6/27 16:31
 * @Created by wangle
 * @Description
 */
//@Component
//public class Rediscountinterceptor  implements HandlerInterceptor {
//    @Autowired
//    StringRedisTemplate stringRedisTemplate;
//
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        String uri=  request.getRequestURI();
//        //每次访问url就会计数加一
//        stringRedisTemplate.opsForValue().increment(uri);
//
//        return true;
//    }
//}
